<?php

namespace app\home\controller;

use think\Controller;
use app\common\model\Goods as GoodsModel;
use app\common\model\Category as CategoryModel;

class Goods extends Base
{
    //
    public function list()
    {
        $id = input('id');
        $list = GoodsModel::where('cate_id',$id)->paginate(10);
        $categorynav = CategoryModel::find($id);
        return view('list',['list'=>$list,'categorynav'=>$categorynav]);
    }
    public function item()
    {
        $id = input('id');
        $list = GoodsModel::find($id);
        return view('item',['list'=>$list]);
    }
}
